#ifndef STEAMCONNECTOR_H
#define STEAMCONNECTOR_H

#include <QObject>
#include <QNetworkAccessManager>
#include <QNetworkReply>
#include <QMap>

#include "data/Game.h"

class SteamConnector : public QObject
{
Q_OBJECT
public:
    explicit SteamConnector(QObject *parent = 0);
    void start();

signals:
    void receivedSteamData(QMap<QString, Game>);

private slots:
    void gotReply(QNetworkReply *reply);
    void gameListReply(QNetworkReply *reply);
    void achievementListReply(QNetworkReply *reply);

private:
    QNetworkAccessManager *m_nam;
    QString m_steamId;
    QMap<QNetworkReply *, QString> m_achievementRequestMap;
    QMap<QString, Game> m_gameMap;


};

#endif // STEAMCONNECTOR_H
